{extend name="index/index"}
{block name="mycss"}
<link href="/static/index/css/pic.css" rel="stylesheet">
<link href="/static/index/css/pic1.css" rel="stylesheet">
<link href="/static/index/css/style.css" rel="stylesheet" type="text/css" media="all"/>
<style type="text/css" media="screen">

</style>
{/block}

{block name="fjs"}
<script type="text/javascript">
    var now = new Date();
    var beginTime = now.getTime();
    var b = 1;
    var stime = "1534990869";
    setInterval(function () {
        stime++;
    }, 1000);
</script>
{/block}
{block name="main"}
<div style="background-color: red;">
</div>
{/block}
{block name="main1"}
<div class="box-topic" data-lkid="15">
    <div class="w1200">
        <div class="topic-wrap h-lg roll-box " id="NO08758">
            <div class="roll-wrap">
                <div class="clearfix" style="width: 1300px;">
                    <div class="qv-index">
                        <div class="qv-back"
                             style="background-image: url(&quot;http://icon.qiantucdn.com///20180720/26cd10bb0784eac43ab099679eb933182&quot;);">
                            <!---->
                            <div class="qv-share"><i class="icon icon-fenxiang"></i>
                                <div class="shareContent handle-share">
                                    <div class="Arrow"></div>
                                    <ul class="img-share bdsharebuttonbox bdshare-button-style0-16"
                                        data-bd-bind="1535432758792">
                                        <a href="javascript:void (0);" title="分享到QQ好友" data-cmd="qzone" class="bds_qzone"><i></i>QQ</a>
                                        <a href="javascript:void (0);" title="分享到新浪微博" data-cmd="tsina"
                                           class="bds_tsina "><i></i>微博</a> 
                                        <a href="javascript:void (0);" title="分享到花瓣" data-cmd="huaban" class="bds_huaban"><i></i>花瓣</a>
                                    </ul>
                                </div>
                            </div>
                            <div class="qv-text">
                                <div class="qv-attention"><span>关注<br><strong class="">{$friendscount}</strong></span></div>
                                <div class="qv-bean"><span>粉丝<br><strong class="fas-num">{$fanscount}</strong></span></div>
                            </div>
                            {if condition= "($userinfo.icon)"}
                                <div class="qv-via" style="background-image: url(&quot;http://pdyc9epam.bkt.clouddn.com/{$userinfo.icon}&quot;);"> </div>
                            {else /}
                                <div class="qv-via" style="background-image: url(&quot;static/default.jpg&quot;);"> </div>
                            {/if}
                            </div>
                        <div class="qv-rowName"><h4 class="qv-name">{$userinfo.nickname}</h4></div>
                            <div class="qv-homeBtn"><!----> <!---->
                                    <a class=" qt-btn btn-green-linear" style="margin-top: 10px;width: 100px;height: 40px;line-height: 40px;color: #fff" href="{:url('index/personal/edit')}" >个人资料</a>
                            </div>
                        <nav id="qv-nav">
                            <ul>
                                <a href="{:url('index/details/home')}"><li class="">作品</li></a>
                                <li class=""><a href="{:url('index/details/collect')}" >收藏</a></li>
                                <a href="{:url('index/details/attention')}"><li class="router-link-exact-active active active">关注</li></a>
                            </ul>
                        </nav>
                    </div>
                        <div class="container" style="margin-top: 20px">
                            <div class="row">
                                <div class="col-md-12" style="background-color: #ccc;height: 60px;line-height: 60px">
                                    <div class="col-md-2"><a href="{:url('index/details/attention')}" >关注({$friendscount})</a></div>
                                    <div class="col-md-2 col-md-pull-1"><a href="{:url('index/details/fans')}">粉丝({$fanscount})</a></div>
                                    <div class="col-md-2 col-md-pull-2"><a href="{:url('index/details/friends')}" style="color: green">推荐好友</a></div>
                                </div>
                                {if condition="($friendsinfo)"}
                                    {volist name="friendsinfo" id="vo" }
                                    <div class="col-md-12" style="background-color: #ccc;margin-top: 10px">
                                            {if condition="empty($vo.icon)"/}
                                                <div class="col-md-2" >
                                                       <a href="{:url('index/details/home',['uid'=>$vo['id']])}"><img src="static/default.jpg" alt="" class="img-circle"></a>
                                                </div>
                                            {else/}
                                                <div class="col-md-2">
                                                       <a href="{:url('index/details/home',['uid'=>$vo['id']])}"> <img src="http://pdyc9epam.bkt.clouddn.com/{$vo.icon}" class="img-circle" style="width: 200px;height: 150px"></a>
                                                </div>
                                            {/if}
                                        <div class="col-md-3">
                                            {if condition="empty($vo.nickname)"}
                                                <p style="margin-top: 20px;color: #000" class="h4 "></p>
                                            {else /}
                                                <p style="margin-top: 20px;color: #000" class="h4 ">{$vo.nickname}</p>
                                            {/if}
                                            <P style="margin-top: 20px">
 
                                            </P>
                                            <a class="btn btn-success att-btn" data-id={$vo.id} style="margin-top: 20px">点击关注</a>
                                        </div>

                                            {if condition="empty($vo.imgs)"/}
                                            <div class="col-md-6 col-md-offset-1" style="margin-top: 50px;line-height: 100px" >
                                                <span class="h1">暂无作品</span>
                                            </div>
                                            {else /}
                                            <div class="col-md-6 col-md-offset-1" style="margin-top: 20px" >
                                                <img src="http://pdyc9epam.bkt.clouddn.com/{$vo.imgs}" alt="" style="width: 240px;height: 120px;margin-left: 100px">
                                            </div>
                                            {/if}
                                    </div>
                                    {/volist}
                                {else/}
                                        <a href="{:url('index/index/index')}" ><img src="/static/atten.jpg" alt=""></a>
                                {/if}
                            </div>

                        </div>
                </div>
            </div>

        </div>
    </div>
</div>
{/block}
{block name="myjs"}
<script>
    $('.att-btn').click(function(){
        var fid=$(this).attr('data-id');
        var obj = $(this).parents('.col-md-12');
        attAjax(fid,obj);
    })

    
    function attAjax(fid,obj)
    {
        $.ajax({
            type:'get',
            data:{'fid':fid},
            dataType:'json',
            url:'/doattention',
            success:function(data){
                if(data.status){
                obj.remove();
                toastr.success(data.info);
                }else{
                toastr.success(data.info);
                }
            },
            error:function(){
                  toastr.error('系统错误');
            }
        });
    }
</script>
{/block}